//
//  MeDataTool.h
//  laowu
//
//  Created by 尹桥印 on 15/4/29.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "BaseDataTool.h"
#import "LoginRes.h"
#import "WorkReportListRes.h"
#import "MineMsgRes.h"
#import "PeiXunRes.h"
#import "MigrantProfileRes.h"
#import "CompanyProfileRes.h"
#import "LeaderProfileRes.h"
#import "TechProfileRes.h"
#import "RecmdRes.h"
#import "ProxyProfileRes.h"
@interface MeDataTool : BaseDataTool

/**
 *  获取手机验证码
 *
 *  @param phone   手机号
 *  @param success
 *  @param failure
 */
+ (void)getVeriCodeWithPhone:(NSString *)phone success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  登录
 *
 *  @param userName 用户名
 *  @param password 用户密码
 *  @param success
 *  @param failure
 */
+ (void)loginWithUserName:(NSString *)userName password:(NSString *)password success:(void (^)(LoginRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取工作汇报列表
 *
 *  @param maxId   最大的id
 *  @param success
 *  @param failure
 */
+ (void)getWordReportListWithMaxId:(NSInteger)maxId success:(void (^)(WorkReportListRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  工作汇报
 *
 *  @param param
 *  @param success
 *  @param failure
 */
+ (void)workReportWithParam:(NSDictionary *)param url:(NSString *)url success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;


/**
 *  意见反馈
 *
 *  @param content 内容
 *  @param success
 *  @param failure
 */
+ (void)feedBackWithContent:(NSString *)content success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;


/**
 *  修改密码
 *
 *  @param param 参数
 *  @param success
 *  @param failure
 */
+ (void)change_pswWithParam:(NSString *)oldpwd newpwd:(NSString *)newpwd success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  我的消息
 */
+ (void)getMineMsgWithMaxId:(NSInteger)maxId success:(void (^)(MineMsgRes *result))success failure:(void (^)(NSError *error))failure;


/**
 *  获取我的职位申请列表
 *
 *  @param maxId
 *  @param success
 *  @param failure
 */
+ (void)getJobListWithMaxId:(NSInteger)maxId success:(void (^)(PeiXunRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  删除我的申请职位列表
 *
 *  @param idArray
 *  @param success
 *  @param failure
 */
+ (void)deleteJobApplyWithIdArray:(NSArray *)idArray success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取我的培训申请列表
 *
 *  @param maxId
 *  @param success
 *  @param failure
 */
+ (void)getPeiXunListWithMaxId:(NSInteger)maxId success:(void (^)(PeiXunRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  删除我申请的培训
 *
 *  @param idArray id数组
 *  @param success
 *  @param failure
 */
+ (void)deleteTrainApplyWithIdArray:(NSArray *)idArray success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;


/**
 *  删除消息
 *
 *  @param idArray id数组
 *  @param success
 *  @param failure
 */
+ (void)deleteMsgWithIdArray:(NSArray *)idArray success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;


/**
 *  验证短信码是否正确
 */
+ (void)getSucWithPhone:(NSString *)phone code:(NSString *)code  success:(void (^)(BaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 * 获取民工资料
 */
+ (void)getMigrantProfile:(void (^)(MigrantProfileRes *result))success failure:(void (^)(NSError *error))failure;
/**
 * 获取劳务公司资料
 */
+ (void)getCompanyProfile:(void (^)(CompanyProfileRes *result))success failure:(void (^)(NSError *error))failure;
/**
 * 获取班组长资料
 */
+ (void)getLeaderProfile:(void (^)(LeaderProfileRes *result))success failure:(void (^)(NSError *error))failure;
/**
 * 获取技术员资料
 */
+ (void)getTechProfile:(void (^)(TechProfileRes *result))success failure:(void (^)(NSError *error))failure;
/**
 * 获取代理机构资料
 */
+ (void)getProxyProfile:(void (^)(ProxyProfileRes *result))success failure:(void (^)(NSError *error))failure;

/**
 *  注册接口
 *
 *  @param param   注册所需要的参数
 *  @param url     注册地址  (民工：api/mg/join.json，班组长：api/b/join.json，平台质检员、施工员、业务员、业务经理、项目经理进行注册:api/z/join.json，平台甲方、劳务公司、承建方进行注册：api/o/join.json，平台省级代理、市级代理进行注册：api/d/join.json)
 *  @param success
 *  @param failure
 */
+ (void)registerWithParam:(NSDictionary *)param url:(NSString *)url success:(void (^)(LoginRes *result))success failure:(void(^)(NSError *error))failure;


/**
 *  修改资料
 *
 *  @param param   参数
 *  @param success
 *  @param failure
 */
+ (void)modifyInfoWithParam:(NSDictionary *)param success:(void (^)(BaseResponse *result))success failure:(void(^)(NSError *error))failure;

/**
 *  会员头像修改接口
 *
 *  @param url     头像的url
 *  @param success
 *  @param failure
 */
+ (void)modifyUserImgWithUrl:(NSString *)url success:(void (^)(BaseResponse *result))success failure:(void(^)(NSError *error))failure;


/**
 *  安全知识与生活常识投稿接口
 *
 *  @param param
 *  @param url
 *  @param success
 *  @param failure
 */
+ (void)newLifeCommondWithParam:(NSDictionary *)param url:(NSString *)url success:(void (^)(BaseResponse *result))success failure:(void(^)(NSError *error))failure;


/**
 *  获取推荐人列表
 *
 *  @param userName 搜索的用户名
 *  @param begin    开始时间 2015-12-24
 *  @param end      结束时间 2015-12-25
 */
+ (void)getRecmtListWithUserName:(NSString *)userName begin:(NSString *)begin end:(NSString *)end success:(void (^)(RecmdRes *result))success failure:(void(^)(NSError *error))failure;

@end
